package server

import (
	"week2/dao"
	"week2/utils"
)

func GetUserInfo(userid string) (int, string, *dao.UserInfo) {
	result, err := dao.QueryUserInfo(userid)
	if err.UnFondError() {
		return 300, "no exist user", nil
	} else if err == nil {
		return 200, "success", result
	} else {
		utils.LogError.Printf("Query User Info error:%+v", err)
		return err.GetCode(), err.GetMsg(), nil
	}
}
